<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>实战02-子父通信</title>

    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.js"></script>

</head>
<body>
    
    <div id="app">
        <h1>Vue实例标题：{{title}}</h1>
        <!-- 插槽演示 -->
        <!-- <cpn><h2>填充111</h2></cpn> -->
        <cpn>111</cpn>
    </div> 

<template id="cpn">
    <div>
    <hr>
        <h2>这是Vue components</h2>
    <hr><br>
    <slot><span>slot占位</span></slot>
    </div>
</template>
</body>
</html>

<script>

var app = new Vue({
  el: '#app',
  data: {
      title:'这是标题',
      pv01:'哈哈哈',
      pv02:'呵呵',
      categories:[
          {key:1,v:'足球'},
          {key:2,v:'懒球'},
          {key:3,v:'羽毛球'},
      ],
      mytabShowData:{key:-1 , v: ''}
  },
  methods:{
  },
  components:{
      cpn:{
          template:'#cpn',
      }
  }
})
</script>